<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    运行结果：<div id="result"></div>
    <script>
        var red,white,black;
        var red=1;
        while(red<=25){
              var black=28-red;
              var white=25-red;
            if(red+white===25 && white+black===31 && red+black===28){
                console.log('红球：'+red+'个;'+'黑球：'+black+'个;'+'白球：'+white+'个')
                document.write('红球：'+red+'个;'+'黑球：'+black+'个;'+'白球：'+white+'个')
           }
           red++;
           continue;
        }
        
    </script>
</body>
</html>